
FILE(GLOB test_srcs test-*.cpp *.hpp)
ADD_EXECUTABLE(test-main main.cpp ${test_srcs})
TARGET_LINK_YOCTO( test-main )
IF( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
	TARGET_LINK_LIBRARIES( test-main dl )
ENDIF()

ENABLE_TESTING()
ADD_TEST(Platform    test-main platform)
ADD_TEST(Mutex       test-main mutex)
ADD_TEST(Round       test-main round)
ADD_TEST(Unroll      test-main unroll)
ADD_TEST(WTime       test-main wtime)
ADD_TEST(Rand        test-main rand)
ADD_TEST(Thread      test-main thread)
ADD_TEST(CorePool    test-main pool)
ADD_TEST(CoreList    test-main list)
ADD_TEST(AtExit      test-main at_exit)
ADD_TEST(Global      test-main global)
ADD_TEST(Slice       test-main slice)
ADD_TEST(Carver      test-main carver)
ADD_TEST(Pooled      test-main pooled)
ADD_TEST(String      test-main string)
ADD_TEST(TypeTraits  test-main type_traits)
ADD_TEST(Functor     test-main functor)
ADD_TEST(Container   test-main container)
ADD_TEST(Sequence    test-main sequence)
ADD_TEST(Primes      test-main primes)
ADD_TEST(Property    test-main ppty)
ADD_TEST(UUID        test-main uuid)
ADD_TEST(Env         test-main env USER HOME WINDIR)
ADD_TEST(UTF8        test-main utf8)
ADD_TEST(Scroll      test-main scroll)
ADD_TEST(AutoScroll  test-main auto_scroll)
ADD_TEST(Slab        test-main slab)
ADD_TEST(Embed       test-main embed)
ADD_TEST(Map         test-main map)
ADD_TEST(Set         test-main set)
ADD_TEST(Locate      test-main locate)
ADD_TEST(SharedPtr   test-main shared_ptr)
ADD_TEST(Stock       test-main stock)
ADD_TEST(FragLayout  test-main frag_layout)
ADD_TEST(FragBlock   test-main frag_block)
ADD_TEST(Bitio       test-main bitio)
ADD_TEST(XArray      test-main xarray)
ADD_TEST(Dict        test-main dict)
ADD_TEST(Catalog     test-main catalog)
ADD_TEST(C-Array     test-main c_array)
ADD_TEST(Sort        test-main sort)
ADD_TEST(Duration    test-main duration)
ADD_TEST(ETA         test-main eta)
ADD_TEST(Records     test-main records)
ADD_TEST(Index       test-main index)
ADD_TEST(IntrPtr     test-main intrusive_ptr)
ADD_TEST(SortedVec   test-main sorted_vec)
ADD_TEST(CircList    test-main clist)
ADD_TEST(Cached      test-main cached)
ADD_TEST(Labelled    test-main labelled)
ADD_TEST(BSwap       test-main bswap)
ADD_TEST(Threads     test-main threads)
ADD_TEST(Scan        test-main scan)
ADD_TEST(WD          test-main wd)
ADD_TEST(Unique      test-main unique)
ADD_TEST(RemoveIf    test-main remove_if)
ADD_TEST(RawFile     test-main raw_file)
ADD_TEST(CSlot       test-main cslot)
ADD_TEST(VSlot       test-main vslot)
ADD_TEST(XSlot       test-main xslot)
ADD_TEST(DualMap     test-main dualmap)
ADD_TEST(DualSet     test-main dualset)
ADD_TEST(DualSet2    test-main dualset2)
ADD_TEST(MultiMap    test-main multi_map)
ADD_TEST(MLock       test-main mlock)
ADD_TEST(Pages       test-main pages)
ADD_TEST(BMove       test-main bmove)
ADD_TEST(QSort       test-main qsort)
ADD_TEST(MultiArrays test-main multi_arrays)
ADD_TEST(Polynomial  test-main poly)
ADD_TEST(Condition   test-main condition)
ADD_TEST(Barrier     test-main barrier)
ADD_TEST(Crew        test-main simd)
ADD_TEST(Server      test-main server)
ADD_TEST(Dist        test-main dist)
ADD_TEST(Lexicon     test-main lexicon)
ADD_TEST(Comb        test-main comb)
ADD_TEST(Dispatch    test-main dispatch)
ADD_TEST(MPI_Split   test-main mpi_split)
ADD_TEST(Ipower      test-main ipower)
ADD_TEST(Tuple       test-main tuple)
ADD_TEST(Factory     test-main factory)
ADD_TEST(kChunk      test-main kChunk)
ADD_TEST(kArena      test-main kArena)
ADD_TEST(kBlocks     test-main kBlocks)

#ADD_CUSTOM_TARGET(check-main COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS test-main)
